module.exports = (function () {
  codeList = {};
  let newtime = new Date();
  let hours = newtime.getHours();
  let minustes = newtime.getMinutes();
  let ifhours = hours < 4 ? 4 - hours : 24 + 4 - hours;
  let calc = (ifhours * 60 - (minustes <= 0 ? 0 : minustes)) * 1000 * 60;
  console.log(logmagenta(newtime.toLocaleTimeString()));
  let timeInt = setInterval(timefn, calc);
  function timefn() {
    console.log(logsucc("清除验证码"));
    codeList = [];
    clearInterval(timeInt);
    timeInt = setInterval(timefn, 1000 * 60 * 60 * 24);
  }
})();
